package com.wanmait.hr.controller;

import com.wanmait.hr.service.MemuService;
import com.wanmait.hr.vo.Memu;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/manage")
public class MemuController {
    @Resource
    private MemuService memuService;
    //侧边栏
    @RequestMapping("/inc/sidebar")
    public ModelAndView getSidebar(){
        ModelAndView mv = new ModelAndView();
        List<Memu> memu = memuService.findAll();
        return mv.addObject("Memu",memu);
    }
}
